<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <form ref="form">
    用户名:<input type="text" name="username" v-model="form.username"> <br/>
    密码:<input type="text" name="password" v-model="form.password">
  </form>
</template>

<script>
export default {
  data(){
    return {
      form:{
        username:'',
        password:''
      }
    }
  },
  methods:{
    //在子组件内定义提交方法
    subSubmit(){
      console.log(this.form.username,this.form.password)
    },
  }
}
</script>

<style scoped>

</style>